import axios from "../dataAxios";

/* 获取首页轮播图的数据 */
export const getHomeSwiperList = () => axios.get("home/swiperdata").catch(err => console.log(err));

/* 首页图片导航的接口 */
export const getHomeCatItems = () => axios.get("home/catitems").catch(err => console.log(err));

/* 首页的图片列表的接口 */
export const getHomePicList = () => axios.get("home/floordata").catch(err => console.log(err));

// 搜索中心的搜索结果接口
export const searchGoods = (params) => axios.get("goods/qsearch", {
    params: params
}).catch(err => console.log(err))

// 分类页面数据列表接口
export const getCategories = (params) => axios.get("/categories", {
    params: params
}).catch(err => console.log(err))

/* 获取商品详情 */
export const getGoodsDetail = (params) => axios.get("goods/detail", {
    params: params
}).catch(err => console.log(err))

/* 获取商品列表信息 */
export const getProductList = (params) => axios.get("goods/search", {
    params: params
}).catch(err => console.log(err))